<?php

include_once(dirname(__FILE__) . '/../database/dbSchedules.php');

class testdbSchedules_New extends UnitTestCase {

    function testdbSchedulesNewModule() {
        schedule_person("One", "Mon", "9-12", "jane2077291234");
        $this->assertTrue(is_scheduled("One", "Mon", "9-12", "jane2077291234"));
        //TODO: get_person()
        $this->assertTrue(get_person_ids("One", "Mon", "9-12")[2] == "jane2077291234");
        $this->assertTrue(get_total_slots("One", "Mon", "9-12") == 2);
        $this->assertTrue(edit_schedule_vacancy("One", "Mon", "9-12", 1));
        $this->assertTrue(get_total_vacancies("One", "Mon", "9-12") == 1);
        $this->assertTrue(edit_schedule_vacancy("One", "Mon", "9-12", -1));
        $this->assertTrue(check_valid_schedule("One", "Mon", "9-12"));
        //TODO: get_dbSchedules()
        unschedule_person("One", "Mon", "9-12", "jane2077291234");
        $this->assertFalse(is_scheduled("One", "Mon", "9-12", "jane2077291234"));

        
        
        echo("testdbSchedules complete");
    }

}

?>
